#ifndef _MYLIB_ZHY_LOG_INLINE_H_
#define _MYLIB_ZHY_LOG_INLINE_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <libgen.h> /*for basename*/
#ifndef basename
#define basename
#endif

#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
#	if defined __GNUC__ && __GNUC__ >= 2
#		define __func__ __FUNCTION__
#	else
#		define __func__ "<unknown>"
#	endif
#endif

#define msg_inner printf("[msg][%s][%d][%s] ", basename((char *)__FILE__), __LINE__, __func__);printf
#if 1
#define dbg_inner printf("[dbg][%s][%d][%s] ", basename((char *)__FILE__), __LINE__, __func__);printf
#else
#define dbg_inner
#endif

#define COLOR_BLACK					"\033[0;30m"
#define COLOR_RED 					"\033[0;31m"
#define COLOR_LIGHT_RED 			"\033[1;31m"
#define COLOR_GREEN 				"\033[0;32m"
#define COLOR_LIGHT_GREEN			"\033[1;32m"
#define COLOR_YELLOW 				"\033[0;33m"
#define COLOR_LIGHT_YELLOW 			"\033[1;33m"
#define COLOR_BLUE 					"\033[0;34m"
#define COLOR_LIGHT_BLUE 			"\033[1;34m"
#define COLOR_PURPLE	 			"\033[0;35m"
#define COLOR_LIGHT_PURPLE 			"\033[1;35m"
#define COLOR_CYAN		 			"\033[0;36m"
#define COLOR_WHITE 				"\033[0;37m"

#define COLOR_NONE 					"\033[m"


#define LOG_LEVEL_ERROR			"[*ERR*]"
#define LOG_LEVEL_WARN			"[*WARN]"
#define LOG_LEVEL_MSG			"[*MSG*]"
#define LOG_LEVEL_INFO			"[*INFO]"
#define LOG_LEVEL_DEBUG			"[DEBUG]"

#endif //_MYLIB_ZHY_LOG_INLINE_H_